<?php

function smarty_function_afCheckBox($params, &$smarty)
{
    $widget = $smarty->getTemplateVars("_widgetActiveForm");
    $model = $smarty->getTemplateVars("_modelForWidgetActiveForm");
    if (!$widget)
    {
        throw new CException(Yii::t('afCheckBox must be applay fot widget ActiveForm'));
    }
    echo $widget->checkBox($model, $params['property'], $params['attr']);
}
